package com.zhw.mapper;

import com.github.pagehelper.Page;
import com.zhw.pojo.dto.ChanceQueryDTO;
import com.zhw.pojo.entry.SaleChance;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ChanceMapper {


    Page<SaleChance> page(ChanceQueryDTO chanceQueryDTO);


    @Select("select id from user where username=#{assigMan}")
    Integer getIdByUsername(String assignMan);


    void save(SaleChance saleChance);

    @Select("select * from sale_chance where id=#{id}")
    SaleChance getByID(Integer id);


    void update(SaleChance saleChance);

    @Delete("delete from sale_chance where id=#{id} ")
    void deleteByID(Integer id);
}
